#!/usr/bin/env python

from kegg import get_server

def main():
    server  = get_server()
    for org in server.list_organisms():
        for pathway in server.list_pathways(org['entry_id']):
            definition, path_name = pathway['definition'].rsplit(' - ', 1)
            print "%s\t%s\t%s" % (pathway['entry_id'], path_name, definition)


if __name__ == '__main__':
    main()

